﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;


namespace HotelBookingSystem
{
    public abstract class Room
    {
        protected string description = "room";
        protected decimal rate = 130;

        public virtual string GetDescription()
        {
            return description;
        }

        public abstract decimal Cost();
    }

    public abstract class RoomDecorator : Room
    {
        public override string GetDescription()
        {
            return description;
        }
    }

    public class SingleRoom : Room
    {
        public SingleRoom(decimal rate)
        {
            description = "Single Room";
            this.rate = rate;
        }

        public override decimal Cost()
        {
            return  rate;
        }
    }

    public class DoubleRoom : Room
    {
        public DoubleRoom(decimal rate)
        {
            description = "Double Room";
            this.rate = rate;
        }

        public override decimal Cost()
        {
            return rate + 60;
        }
    }

    public class Appartment : Room
    {
        public Appartment(decimal rate)
        {
            description = "Appartment";
            this.rate = rate;
        }

        public override decimal Cost()
        {
            return rate + 120;
        }
    }

    public class Smoker : RoomDecorator
    {
        Room room;
        public Smoker(Room room)
        {
            this.room = room;
        }

        public override string GetDescription()
        {
            return room.GetDescription() + ", Smoker";
        }

        public override decimal Cost()
        {
            return 12 + room.Cost();
        }
    }

    public class View : RoomDecorator
    {
        Room room;
        public View(Room room)
        {
            this.room = room;
        }

        public override string GetDescription()
        {
            return room.GetDescription() + ", View";
        }

        public override decimal Cost()
        {
            return 15 + room.Cost();
        }
    }

    public class MiniBar : RoomDecorator
    {
        Room room;
        public MiniBar(Room room)
        {
            this.room = room;
        }

        public override string GetDescription()
        {
            return room.GetDescription() + ", MiniBar";
        }

        public override decimal Cost()
        {
            return 15 + room.Cost();
        }
    }
}
